home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 November / CHIP Kasım 1997.iso / ARACLAR / TER500 / 500TER._XE / SCRIPT.EXE / COLOR.INC < prev    next >
Encoding:
Text File  |  1995-08-13  |  2.5 KB  |  72 lines

  1.  
  2. % COLOR110.INC Color and Blink attributes
  3. % ---------------------------------------
  4. %
  5. % Contents:
  6. %
  7. % - Store colors in variables.                   (Bo Bendtsen  10-Aug-1995)
  8. % - Function BlinkBit - test status of BlinkBit  (Joop Blokker 12-Aug-1995)
  9. % - Function ToggleBlinkBit - set/reset BlinkBit (Joop Blokker 13-Aug-1995)
  10. %
  11. % =========================================================================
  12. % - Store colors in variables.                   (Bo Bendtsen  10-Aug-1995)
  13. % =========================================================================
  14. % Low intensity:
  15. % Foreground & Background)
  16. % ------------------------
  17.   Set Black        =   0
  18.   Set Blue         =   1
  19.   Set Green        =   2
  20.   Set Cyan         =   3
  21.   Set Red          =   4
  22.   Set Magenta      =   5
  23.   Set Brown        =   6
  24.   Set LightGray    =   7
  25.  
  26. %
  27. % Foreground  and  Blinking OR Intensive Background
  28. % ------------------------
  29.   Set DarkGray     =   8
  30.   Set LightBlue    =   9
  31.   Set LightGreen   =  10
  32.   Set LightCyan    =  11
  33.   Set LightRed     =  12
  34.   Set LightMagenta =  13
  35.   Set Yellow       =  14
  36.   Set White        =  15
  37.  
  38. % =========================================================================
  39. % - Function BlinkBit - Test status of BlinkBit  (Joop Blokker 12-Aug-1995)
  40. % =========================================================================
  41. %
  42. % Test Blink attribute.
  43. %  If ON  (1) then text is blinking.
  44. %  If OFF (0) then text has High-Intensity background.
  45. % -----------------------------------------------
  46. Function BlinkBit()
  47. Set Status = MEM(64,101)         % get byte from memory
  48. Set BinaryS = Binary(Status,8)   % convert to binary string
  49. If Copy(BinaryS,3,1) ="1"        % test bit 5 - blinkbit
  50.   Set Status = 1                 % blinking
  51. else
  52.   Set Status = 0                 % not blinking (high intensive background)
  53. endif
  54. EndFunc Status
  55.  
  56. % =====================================================================
  57. % - Function ToggleBlinkBit - set/reset BlinkBit (Joop Blokker 13-Aug-1995)
  58. % =====================================================================
  59. %
  60. % Toggle Blink attribute.
  61. %  If ON  (1) then text is blinking if Background > 7
  62. %  If OFF (0) then text has High-Intensity background if Background > 7
  63. % ---------------------------------------------------------------------
  64. Function ToggleBlinkBit(Status)
  65. If Status = 1
  66.   Set Dummy = INTERRUPT(16, 4099, 1, 0, 0, 0, 0, 0, 0)
  67. else
  68.   Set Dummy = INTERRUPT(16, 4099, 0, 0, 0, 0, 0, 0, 0)
  69. endif
  70. EndFunc
  71.  
  72.